package com.lsu.proxy.homework;

import java.lang.reflect.Proxy;

/**
 * 测试类
 *
 * @Author wang suo
 * @Date 2020/12/28 0028 11:11
 * @Version 1.0
 */
public class Test {
    public static void main(String[] args) {
        ComputerMaker maker = new ComputerMaker();
        SaleComputer saleComputer = (SaleComputer) Proxy.newProxyInstance(Test.class.getClassLoader(), maker.getClass().getInterfaces(), new ProxyFunction(maker));
        saleComputer.sale(1000);
    }
}
